<!DOCTYPE HTML>
<html>
<!--
-->
<head>
  <title>Test that we reject syntax errors listed in property_database.js</title>
  <script type="text/javascript" src="../mochitest-simplified/packed.js"></script>
  <script type="text/javascript" src="../mochitest-simplified/SimpleTest.js"></script>
  <script type="text/javascript" src="property_database.js"></script>
  <link rel="stylesheet" type="text/css" href="../mochitest-simplified/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">

<div id="testnode"></div>
  
</div>
<pre id="test">
<script class="testbody" type="text/javascript">

var gDeclaration = document.getElementById("testnode").style;

for (var property in gCSSProperties) {
  var info = gCSSProperties[property];
  for (var idx in info.invalid_values) {
    var badval = info.invalid_values[idx];

    gDeclaration.setProperty(property, badval, "");

    is(gDeclaration.getPropertyValue(property), "",
       "invalid value '" + badval + "' not accepted for '" + property +
       "' property");

    if ("subproperties" in info) {
      for (var sidx in info.subproperties) {
        var subprop = info.subproperties[sidx];
        is(gDeclaration.getPropertyValue(subprop), "",
           "invalid value '" + badval + "' not accepted for '" + property +
           "' property when testing subproperty '" + subprop + "'");
      }
    }

    gDeclaration.removeProperty(property);
  }
}

</script>
</pre>
</body>
</html>
